const { ccclass, property } = cc._decorator;

@ccclass
export default class loadLobby extends cc.Component {
    _LobbyBg: cc.SpriteFrame = null;
    _heroIcons: cc.SpriteAtlas = null;
    _awardIcons: cc.SpriteAtlas = null;
    _levelItemPfb: cc.Prefab = null;
    GoodsPfb: cc.Prefab = null
    TaskPfb: cc.Prefab = null
    skillItemPfb: cc.Prefab = null;
    SkillIcons: cc.SpriteAtlas = null;
    SkillsJson: any = null;
    TaskJson: any = null;
    _gameJson: any = null;
    _heroDetails: any = null;
    _StoreJson: any = null;
    onLoad() {
        cc.game.addPersistRootNode(this.node);
        cc.game.on(cc.game.EVENT_HIDE, this.quitcallback);
    }

    quitcallback() {
        gameHelper.getInstance().quitTime = new Date();
    }

    onDestroy() {

        this.GoodsPfb.decRef();
        this.GoodsPfb = null;
        this.TaskPfb.decRef();
        this.TaskPfb = null;
        this._LobbyBg.decRef();
        this._LobbyBg = null;
        this._heroDetails = null;
        this._heroIcons.addRef();
        this._heroIcons = null;
        this._awardIcons.addRef();
        this._awardIcons = null;
        this._levelItemPfb.addRef();
        this._levelItemPfb = null;
        this._gameJson.addRef();
        this._gameJson = null;
        this.SkillIcons.decRef();
        this.SkillIcons = null;

        this.SkillsJson = null;
        this._StoreJson = null;
        this.TaskJson = null;
    }
}
